package dk.aiszone.lang.messer.autosource.interfaces;

/**
 * Interface implemented by objects which supports modifications.
 * 
 * @author Ais
 */
public interface ModifiableObject {

    /**
     * Retrieve the column number of the <code>ModifiableObject</code>.
     * 
     * @return The starting column no. of the statement.
     */
    public abstract int getColumn();

    /**
     * Retrieve the number of modifications supported by the <code>ModifiableObject</code>.
     * 
     * @return The number of supported modifications - or zero if none is supported.
     */
    public abstract int getNumberOfSupportedModifications();

    /**
     * Retrieve the row no. of the statement.
     * 
     * @return The row no. of the statement start.
     */
    public abstract int getRow();

    /**
     * Retrieve whehter the <code>ModifiableStatement</code> supports modifications.<br>
     * Some <code>ModifiableStatement</code> may only be modifiable when containing surden data.
     * 
     * @return <code>true</code> if modifiable - otherwise <code>false</code>.
     */
    public abstract boolean isModifiable();

    /**
     * Instructs the <code>ModifiableStatement</code> to modify it-self.<br>
     * The way the statement modifies it-self is up to the statement.<br>
     * 
     * @param index
     *            The modification index to invoke.
     */
    public abstract void modify(int index);

    /**
     * Reverts the <code>ModifiableObject</code> back to it's original state.
     */
    public abstract void revert();
}